import request from "@/utils/request";
export const reqUsercode = (data)=>request({url:`/user/sendCode`,method:'post',data})



export const reqRegister = (data)=>request({url:'/user/register',method:'post',data})
export const reqUserList = ()=>request({url:'/videotype/list',method:'get'})
export const reqVedioList = ()=>request({url:'/video/list',method:'post',data:{currPage:1,pageSize:100}})

export const reqUpdateName = (data)=>request({url:'/user/update',method:'post',data})

export const reqUserLogin = (data)=>request({url:'/user/login',method:'post',data})

// 忘记密码的接口
export const reqForgetPassword = (data)=>request({url:'/user/forgetPassword',method:'post',data})
// 搜索的接口
export const reqSearchList = (pageNumber,pageSize,keywords)=>request({url:`/video/findVideoData/${pageNumber}/${pageSize}/${keywords}`,method:'get'})

// 上传视频的接口
export const reqPublicVedio = (data) =>request({url:'/updata/uploadFile',method:'post',data})

// 评论接口
export const reqUserCommentSave = (data) =>request({url:'/usercomment/save',method:'post',data})

// 获取评论
export const reqUserCommentList = (id) =>request({url:`/usercomment/findCommentByVideoId/${id}`,method:'get'})


export const reqUserCommentDelete = (data) =>request({url:`/usercomment/delete`,method:'post',data})

// 收藏
export const reqUserCollectSave = (data) =>request({url:'/video/update',method:'post',data})

export const reqUserCollectUpdataSave = (data) =>request({url:'/usercollect/save',method:'post',data})


export const reqVedioInfoByIdList = (id)=>request({url:`/video/info/${id}`,method:'post'})

// export const reqVedioInfoByIdDelete = (data)=>request({url:`/usercollect/delete`,method:'post',data})

// 根据videoId删除收藏视频
export const reqVedioInfoByIdDelete = (ids)=>request({url:`/usercollect/deleteByVideoId/${ids}`,method:'delete'})



export const reqVedioDeleteCollect = (data)=>request({url:`/usercollect/deleteCollect`,method:'post',data})


